package chai.ning.programming.train_1;

import java.util.Scanner;

public class TemperatureConverter {

	public long converter( long t ) {
		
		long c = 5 * ( t - 32 ) / 9;
		return c;
	}
	public static void main(String[] args) {
		TemperatureConverter t = new TemperatureConverter();
		Scanner scanner = new Scanner(System.in);
		String s = null;
		
		do {
			System.out.println( "请输入华氏温度：");
			long Tem = scanner.nextLong();
			long tc = t.converter(Tem);
			System.out.println( tc );
			System.out.println( "是否继续输入？？" );
			System.out.println( "是：1           否：0 ");
			s = scanner.next();
		}while( "1".equals(s));
		scanner.close();
	}
}
